
a = [[0 for j in range(0,5)]for i in range(0,5)]

for i in range(1,4):
	str = input().split()
	for j in range(1,4):
		a[i][j] = float(str[j-1])
# print(a)
sub1 = a[1][1] * a[2][2] * a[3][3] + a[1][2] * a[2][3] * a[3][1] + a[1][3] * a[2][1] * a[3][2]
sub2 = a[1][3] * a[2][2] * a[3][1] + a[1][2] * a[2][1] * a[3][3] + a[1][1] * a[2][3] * a[3][2]
print("%.2lf"%(sub1-sub2))